[BITS 32]
[SECTION .text]

global in_byte
in_byte:
    mov edx, [esp + 4]
    xor eax, eax
    in al, dx
    ret

global in_word
in_word:
    xor eax, eax
    mov edx, [esp + 4]
    xor eax, eax
    in ax, dx
    ret

global out_byte
out_byte:
    mov edx, [esp + 4]
    mov eax, [esp + 8]
    out dx, al
    ret

global out_word:
out_word:
    mov edx, [esp + 4]
    mov eax, [esp + 8]
    out dx, ax
    ret